﻿import java.util.Scanner;

public class Demo {

	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		double lz;
		double lc;
		double ogn;
		String str;
		System.out.println("输入基本工资：");
		while (!sc.hasNextDouble()) {
			str = sc.next();
			System.out.println("输入有误，请重新输入基本工资：");
		}
		lz = sc.nextDouble();
		if (lz <= 0) {
			System.out.println("工资不能为负或者零！");
		} else {
			lc = lz * 0.4;
			ogn = lz * 0.25;
			System.out.println("物价津贴=" + lc);
			System.out.println("房租津贴=" + ogn);
		}

	}
}
